import i18n from '@/common/lang'

export const columns = [
  {
    label: '合同编号',
    width: 140,
    prop: 'number',
    fixed: true
  },
  {
    label: '合同名称',
    width: 'auto',
    prop: 'contractName',
    minWidth: 140
  },
  {
    label: '合同类型',
    width: 'auto',
    prop: 'contractType',
    minWidth: 120
  },
  {
    label: '合同金额/元',
    prop: 'contractAmount',
    width: 'auto'
  },
  {
    label: '合同开始日期',
    prop: 'beginDate',
    width: 140
  },
  {
    label: '合同结束日期',
    prop: 'endDate',
    width: 140
  },
  {
    label: '创建人',
    prop: 'createName',
    width: 'auto'
  },
  {
    label: '创建时间',
    prop: 'createTime',
    width: 140
  },
  {
    label: '合同状态',
    prop: 'state',
    width: 120
  }
]
export const actions = [
  {
    key: 'detail',
    text: '查看',
    permissions: 'srm:contractSupplier:detail'
  },
  {
    key: 'confirm',
    text: '确认合同',
    permissions: 'srm:contract:confirm'
  },
  {
    key: 'complete',
    text: '确认收到',
    permissions: 'srm:contract:complete'
  },
  {
    key: 'mail',
    text: '邮寄合同',
    permissions: 'srm:contract:mail'
  }
]

export const detailColumns = [
  {
    label: '物料编号',
    width: 'auto',
    prop: 'materialCode',
    fixed: true
  },
  {
    label: '物料名称',
    width: 'auto',
    prop: 'materialName'
  },
  {
    label: '物料规格',
    width: 'auto',
    prop: 'materialSpecs'
  },
  {
    label: '物料分类',
    width: 'auto',
    prop: 'materialType'
  },
  {
    label: '单位',
    width: 100,
    prop: 'materialUnit'
  },
  {
    label: '价格(含税)/元',
    width: 120,
    prop: 'unitPrice'
  },
  {
    label: '数量',
    width: 100,
    prop: 'quantity'
  },
  {
    label: '小计/元',
    width: 120,
    prop: 'totalPrice'
  }
]
